package com.ph.elec.template;

import java.util.Arrays;
import java.util.List;

import com.ph.elec.page.IndexPage;


public class AdminViewablePage extends UserViewablePage {
	
	List<String> adminUsers = Arrays.asList(new String[] {
			"kranasian@gmail.com",
			"aileen.apolo@gmail.com",
	});

	@Override
	public boolean onSecurityCheck() {
		if (!super.onSecurityCheck()) {
			return false;
		}
		if (!adminUsers.contains(user.getEmail())) {
			setRedirect(IndexPage.class);
			return false;
		}
		return true;
	}

}
